import Vue from 'vue'
import App from './App.vue'
//导入vuex
import store from './store.js'
//导入MUI
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
//导入Mint-UI
import MintUI from 'mint-ui'
Vue.use(MintUI)
import 'mint-ui/lib/style.css'
// 导入vue-preview
import VuePreview from 'vue-preview'
Vue.use(VuePreview)
//路由模块
import router from './router'

//定义全局过滤器
import moment from 'moment'//导入格式化时间的插件
Vue.filter('dateFormat',function(dataStr,pattern = 'YYYY-MM-DD HH:mm:ss'){
    return moment(dataStr).format(pattern)
})

//导入vue-resource
import VueResource from 'vue-resource'
Vue.use(VueResource)
//设置请求的根路径
Vue.http.options.root = 'http://www.liulongbin.top:3005/'
//全局设置post时候表单数据格式组织形式
Vue.http.options.emulateJSON = true

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
